package com.tepth.remote.control.base.bean;

import com.alibaba.fastjson.JSONObject;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/24
 */
public class ElementBean {

    private double latitude;
    private double longitude;
    private int userId;
    private String id;
    private int radius;
    private String sort;

    public ElementBean() {

    }

    public ElementBean(double latitude, double longitude, int userId, String id, int radius, String sort) {
        this.latitude = latitude;
        this.longitude = longitude;
        this.userId = userId;
        this.id = id;
        this.radius = radius;
        this.sort = sort;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public JSONObject toJSONObject() {
        JSONObject json = new JSONObject();
        json.put("lat", latitude);
        json.put("lng", longitude);
        json.put("uid", userId);
        json.put("eleid", id);
        json.put("radius", radius);
        json.put("sort", sort);
        return json;
    }
}
